<?php
if(!defined('IN_IBEIKE')) {
	exit('Access Denied');
}

class table_common_process extends common_table
{
	public function __construct() {

		$this->_table = 'common_process';
		$this->_pk    = 'processid';

		parent::__construct();
	}

	public function delete_process($name, $time) {
		$name = addslashes($name);
		return DB::delete('common_process', "processid='$name' OR expiry<".intval($time));
	}
	public function fetch_all_by_processid($processid){
		if(!empty($processid)&&$processid){
			return DB::fetch_all('SELECT * FROM %t WHERE processid=%s',array($this->_table,$processid));//返回数组包含各个字段的值
		}
		return false;
	}
}

?>